import request from '@/utils/request.js'

const adminApi = {
    selectAll() {
        return request.get('/admin/selectAll')
    },
    list(adminQuery) {
        return request.get('/admin/list', {params: adminQuery})
    },
    deleteById(id) {
        return request.delete(`/admin/deleteById/${id}`)
    },
    deleteAll(ids) {
        return request.delete(`/admin/deleteAll/${ids}`)
    },
    add(admin) {
        return request.post(`/admin/add`, admin)
    },
    selectById(id) {
        return request.get(`/admin/selectById/${id}`)
    },
    update(admin) {
        return request.put(`/admin/update`, admin)
    },
    login(admin) {
        return request.post(`/admin/login`, admin)
    },
    adminInfo() {
        return request.get(`/admin/adminInfo`)
    },
    updateStatus(id, status) {
        return request.put(`/admin/updateStatus/${id}/${status}`)
    },
    resetPassword(adminPassword) {
        return request.put(`/admin/resetPassword`, adminPassword)
    },
    forgotPassword(adminPassword) {
        return request.put(`/admin/forgotPassword`, adminPassword)
    }
}

export default adminApi